<?php


namespace App\Http\Controllers\Index;


use App\Http\Controllers\Controller;
use App\Models\Index;

class IndexController extends Controller
{
    public function index(Index $index)
    {
        $data = $index->index();
        return view('web.index.index',['data' => $data]);
    }
    public function getData(Index $index)
    {
        $data = $index->getData();
        $result = app('resultJson');
        return response()->json($result->setData($data));
    }
}